home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / STRINGS / TPSTR7 / EXAM27.PAS < prev    next >
Pascal/Delphi Source File  |  1993-03-14  |  6KB  |  118 lines

  1. Program Exam27;
  2.  
  3. {**************************************************************************}
  4. {                                                                          }
  5. { Ce programme démontre les possibilités de StrLwr? et de StrUpr?.         }
  6. {                                                                          }
  7. {**************************************************************************}
  8.  
  9. Uses
  10.   TpStr;
  11.  
  12. Var
  13.   S1 ,
  14.   S2 : String;
  15.  
  16. {  ----------------------------------------------------------------------- }
  17. {                                                                          }
  18. { Note : Les procedures présentées içi supportent toutes les caractères    }
  19. {        internationaux.                                                   }
  20. {        les majuscules : 'ÜÉAÄAÅÇEEEIIIÄÅÉÆÆOÖOUUYÖÜ¢£¥₧AIOUÑÑAO'         }
  21. {        deviendront    : 'çüéâäàåçêëèïîìäåéææôöòûùÿöü¢£¥₧ƒáíóúññ'         }
  22. {        et vice-versa.                                                    }
  23. {                                                                          }
  24. { ------------------------------------------------------------------------ }
  25.  
  26.  
  27. {  ---------------------------------------------------------------         }
  28. {  Procedure   StrLwr(Var Str1: String);                                   }
  29. {  ---------------------------------------------------------------         }
  30. {                                                                          }
  31. {  Effet     : Transforme tous les caractères de la chaîne <Str1> en       }
  32. {              minuscules.                                                 }
  33. {                                                                          }
  34. {  Usage     : Chaîne pascal.                                              }
  35. {                                                                          }
  36. {  Vitesse   : 7800/s                                                      }
  37. {                                                                          }
  38. { -------------------------------------------------------------------------}
  39.  
  40. Procedure Test1;
  41. Begin
  42.   S1 := 'Turbo Pascal';
  43.   StrLwr(S1);
  44.   S1 := 'ÜÉAÄAÅÇEEEIIIÄÅÉÆÆOÖOUUYÖÜ¢£¥₧AIOUÑÑAO';
  45.   StrLwr(S1);
  46. end;
  47.  
  48. {  ---------------------------------------------------------------         }
  49. {  Function   StrLwR_(Str1: String):String;                                }
  50. {  ---------------------------------------------------------------         }
  51. {                                                                          }
  52. {  Effet     : Idem, transformé en fonction.                               }
  53. {                                                                          }
  54. {  Usage     : Chaîne pascal.                                              }
  55. {                                                                          }
  56. {  Vitesse   : 7800/s                                                      }
  57. {                                                                          }
  58. {  Note      : Equivalent à ???? := ChrPaDC(Str1,' ',Maxlen);              }
  59. { -------------------------------------------------------------------------}
  60.  
  61. Procedure Test2;
  62. Begin
  63.   S1 := 'Turbo Pascal';
  64.   S2 := StrLwr_(S1);
  65.   S1 := 'ÜÉAÄAÅÇEEEIIIÄÅÉÆÆOÖOUUYÖÜ¢£¥₧AIOUÑÑAO';
  66.   S2 := StrLwr_(S1);
  67. end;
  68.  
  69. {  ---------------------------------------------------------------         }
  70. {  Procedure   StrUpr(Var Str1: String);                                   }
  71. {  ---------------------------------------------------------------         }
  72. {                                                                          }
  73. {  Effet     : Transforme tous les caractères de la chaîne <Str1> en       }
  74. {              majuscules.                                                 }
  75. {                                                                          }
  76. {  Usage     : Chaîne pascal.                                              }
  77. {                                                                          }
  78. {  Vitesse   : 7800/s                                                      }
  79. {                                                                          }
  80. { -------------------------------------------------------------------------}
  81.  
  82. Procedure Test3;
  83. Begin
  84.   S1 := 'Turbo Pascal';
  85.   StrUpr(S1);
  86.   S1 := 'çüéâäàåçêëèïîìäåéææôöòûùÿöü¢£¥₧ƒáíóúññ';
  87.   StrUpr(S1);
  88. end;
  89.  
  90. {  ---------------------------------------------------------------         }
  91. {  Function    StrUpr_(Str1: String):String;                               }
  92. {  ---------------------------------------------------------------         }
  93. {                                                                          }
  94. {  Effet     : Idem, transformé en fonction.                               }
  95. {                                                                          }
  96. {  Usage     : Chaîne pascal.                                              }
  97. {                                                                          }
  98. {  Vitesse   : 7800/s                                                      }
  99. {                                                                          }
  100. { -------------------------------------------------------------------------}
  101.  
  102. Procedure Test4;
  103. Begin
  104.   S1 := 'Turbo Pascal';
  105.   S2 := StrUpr_(S1);
  106.   S1 := 'çüéâäàåçêëèïîìäåéææôöòûùÿöü¢£¥₧ƒáíóúññ';
  107.   S2 := StrUpr_(S1);
  108. end;
  109.  
  110. Begin
  111.   Test1;
  112.   Test2;
  113.   Test3;
  114.   Test4;
  115. End.
  116.  
  117. { -------------------------------------------------------------------------}
  118.